﻿<%@ Page Title="自定义内容管理" Language="C#" MasterPageFile="~/Masters/Account.Master"
    ValidateRequest="false" AutoEventWireup="true" CodeBehind="CustomSectionList.aspx.cs"
    Inherits="LEARNREN.COM.WebSite.Administrator.CustomSectionList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../editor/ckeditor.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        自定义内容管理
    </h2>
    <div>
        <asp:GridView ID="GridViewCatalogue" runat="server" CssClass="gridViewClass" 
            AutoGenerateColumns="False" EmptyDataText="没有自定义内容" BackColor="White" 
            BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            ForeColor="Black" GridLines="Vertical">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="序号" />
                <asp:BoundField DataField="Title" HeaderText="标题" />
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnEdit" runat="server" CommandArgument='<%# Eval("Id") %>'
                            OnClick="lbtnEdit_Click">编辑</asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="lbtnDel" runat="server" CommandArgument='<%# Eval("Id") %>' OnClick="lbtnDel_Click"
                            OnClientClick="return confirm(&quot;确认要删除吗？&quot;);">删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#F7F7DE" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FBFBF2" />
            <SortedAscendingHeaderStyle BackColor="#848384" />
            <SortedDescendingCellStyle BackColor="#EAEAD3" />
            <SortedDescendingHeaderStyle BackColor="#575357" />
        </asp:GridView>
    </div>
    <div>
        <fieldset class="register">
            <legend>自定义内容</legend>
            <asp:HiddenField ID="txtId" runat="server" />
            <p>
                <asp:Label ID="TitleLabel" runat="server" AssociatedControlID="txtTitle">标题:</asp:Label>
                <asp:TextBox ID="txtTitle" runat="server" CssClass="textEntry"></asp:TextBox>
                <asp:RequiredFieldValidator ID="TitleRequired" runat="server" ControlToValidate="txtTitle"
                    CssClass="failureNotification" ErrorMessage="必须填写“标题”。" ToolTip="标题" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
            </p>
            <p>
                <asp:Label ID="SummaryLabel" runat="server" AssociatedControlID="Summary">内容:</asp:Label>
                <asp:TextBox ID="Summary" runat="server" CssClass="ckeditor" TextMode="MultiLine"
                    Rows="10"></asp:TextBox>
                <asp:RequiredFieldValidator ID="SummaryRequired" runat="server" ControlToValidate="Summary"
                    CssClass="failureNotification" ErrorMessage="必须填写“内容”。" ToolTip="必须填写“内容”。" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
            </p>
            <p class="submitButton">
                <asp:Button ID="btnSaveCustomSection" runat="server" CommandName="MoveNext" Text="保存自定义内容"
                    ValidationGroup="RegisterUserValidationGroup" OnClick="btnSaveCustomSection_Click" />
            </p>
        </fieldset>
    </div>
</asp:Content>
